package acm.蓝桥22;

import java.util.Arrays;
import java.util.Scanner;

public class A傻逼题意 {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int a1=sc.nextInt();
		int a2=sc.nextInt();
		int min=Math.min(a1, a2);
		int max=Math.max(a1, a2);
		
		int[] arr=new int[n];
		for(int i=0;i<n;i++) {
			arr[i]=sc.nextInt();
		}
		Arrays.sort(arr);
		long sumMin=0;
		long sumMax=0;
		for(int i=n-1;i>=n-min;i--) {
			sumMin+=arr[i];
		}
		for(int i=n-min-1;i>=n-min-max;i--) {
			sumMax+=arr[i];
		}
		System.out.printf("%.6f",1.0*sumMin/min+1.0*sumMax/max);
	}
}
